// styles in src/style directory are applied to the whole page

header.navbar {
	background: linear-gradient(135deg, #0143a3, #0273d4);
}

.masthead-followup {
	img {
		width: 64px;
		height: 64px;
	}
}

.footer {
	padding: 3rem 0;
	font-size: 0.85rem;
	text-align: left;

	p {
		margin-bottom: 0;
	}

	a {
		font-weight: 500;
		color: var(--bs-dark-text);
		text-decoration: underline;
	}
}

.social-buttons {
	font-size: x-small;

	a {
		color: #fff;
		text-decoration: none;
	}

	svg {
		fill: currentColor;
	}
}

.sidebar-collapsed {
	margin-left: calc(var(--bs-gutter-x) * -0.5);
	margin-right: calc(var(--bs-gutter-x) * -0.5);
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar {
	position: sticky;
	top: 1rem;
	max-height: calc(100vh - 4rem);
	margin-right: calc(var(--bs-gutter-x) * -0.5);
	overflow-x: hidden;
	overflow-y: auto;
	z-index: 1;

	a {
		text-decoration: none;
	}
}

header.title {
	margin-left: calc(var(--bs-gutter-x) * -0.5);
	margin-right: calc(var(--bs-gutter-x) * -0.5);
	position: relative;

	.content-tabset {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;

		.nav-link {
			border-style: solid;
			border-width: 3px 1px 1px;
			border-radius: 3px 3px 0 0;
		}

		.nav-link:not(.active):hover {
			border-color: transparent;
		}

		.active {
			border-top-color: #28a745;
		}

		.navigation-dropdown {
			cursor: pointer;

			.nav-link {
				padding-right: 0.3rem;
				line-height: 1em;
				border-color: transparent;
				background: none;
				color: #007bff;

				&:hover {
					color: #0056b3;
				}
			}

			.dropdown-toggle:after {
				display: none;
			}

			.dropdown-menu {
				border-color: #d9d9d9;
			}

			svg {
				width: 22px;
				height: 22px;
			}

			&.show {
				.nav-link {
					color: #0056b3;
				}
			}
		}
	}
}

.toc {
	margin-left: 15px;
	//   margin-right: -15px;
	font-size: 1.1rem;

	.toc-item {
		.toc-link {
			//       display: block;
			//       padding: 0.25rem 1.5rem;
			color: var(--bs-secondary-color);

			&.deprecated {
				text-decoration: line-through !important;

				&:first-child {
					margin-top: 0.5rem;
				}
			}
		}

		.nav > li > a {
			font-size: 0.85em;
			display: inline-block;

			&:hover,
			&:focus {
				text-decoration: none;
				margin-left: -0.5rem;
				padding: 0 0.5rem;
				background-color: var(--bs-light-bg-subtle);
				border-radius: 3px;
			}
		}

		.nav > li.active > a {
			font-weight: 500;
			color: var(--bs-body-color);
		}

		&.active > .toc-link {
			font-weight: 500;
			color: var(--bs-body-color);
		}
	}
}

.contextual-nav .nav {
	position: sticky;
	top: 0;

	a {
		color: inherit;
		font-size: 90%;
		padding: 0.25rem 1rem;

		&.active {
			font-weight: 500;
			color: rgba(var(--bs-emphasis-color-rgb), 0.85);
		}
	}

	a:hover {
		color: #0275d8;
	}
}

.deprecated {
	h3 {
		text-decoration: line-through;
	}

	h5 {
		display: inline-block;
	}

	td.label-cell code,
	p.signature,
	code.selector,
	code.export-as {
		text-decoration: line-through;
	}

	.description,
	.meta,
	.lead {
		opacity: 0.5;
	}
}

div.api-doc-component,
.overview {
	margin-bottom: 3rem;

	h2,
	h3 {
		.github-link {
			transition: opacity 0.5s;
			opacity: 0.3;
			margin-left: 0.5rem;
		}

		&:hover {
			.github-link {
				opacity: 1;
			}

			& > .title-fragment {
				opacity: 1;
			}
		}
	}

	section,
	ngbd-overview-section {
		margin-top: 3rem;

		h4 {
			margin-top: 2rem;
			margin-bottom: 1rem;
		}

		.meta {
			font-size: 0.8rem;
			margin-bottom: 1rem;

			> div {
				margin-bottom: 0.5rem;
			}
		}
	}
}

ngbd-page-header {
	margin-top: 3rem;

	h2 {
		&:hover {
			& > .title-fragment {
				opacity: 1;
			}
		}
	}
}

a.title-fragment {
	opacity: 0;
	transition: opacity 125ms ease;
	line-height: inherit;
	position: absolute;
	margin-left: -1.2em;
	padding-right: 0.5em;

	& > img {
		width: 1em;
		height: 1em;
	}
}

a.title-fragment:focus {
	opacity: 1;
}

[data-bs-theme='dark'] div.component-demo .tabset-code .nav .nav-link.active {
	background-color: #161b22;
	border-bottom-color: #161b22;
}

div.component-demo {
	margin-bottom: 3rem;

	> h2 {
		display: flex;
		margin-bottom: 1rem;

		span {
			flex-grow: 1;
		}

		.stackblitz,
		.toggle-code {
			display: flex;
			align-items: center;
			align-self: center;
			opacity: 0.85;
		}

		.toggle-code svg {
			vertical-align: middle;
			fill: #28a745;
		}

		.stackblitz .stackblitz-icon {
			height: 1.2rem;
			margin-left: -0.5rem;
		}

		&:hover {
			& > .title-fragment {
				opacity: 1;
			}
		}
	}

	.tabset-code {
		.nav {
			padding: 0.5rem 1.25rem 0;
			font-size: 80%;

			.nav-link.active {
				background-color: #f6f8fa;
				border-bottom-color: #f6f8fa;
			}

			.nav-link:not(.active) {
				color: var(--bs-tertiary-color);

				&:hover {
					color: var(--bs-secondary-color);
				}
			}
		}

		.nav.nav-pills {
			border-right: 1px solid #dee2e6;
			padding-left: 0.75rem;
			padding-right: 0;

			.nav-link.active {
				color: var(--bs-body-color);
				background-color: var(--bs-body-bg);
				border: 1px solid #dee2e6;
				border-right-color: #f5f5f5;
				border-top-right-radius: 0;
				border-bottom-right-radius: 0;
				margin-right: -1px;
			}

			& + .tab-content {
				flex: 1;
				overflow: hidden;
			}
		}

		pre {
			margin: 0;
			max-height: 500px;
			overflow: auto;
		}
	}
}

.examples-legend {
	font-size: 80%;
}

ngbd-api-docs,
ngbd-api-docs-class,
ngbd-api-docs-config {
	display: block;

	&:not(:first-child) {
		margin-top: 3rem;
		border-top: 1px solid #999;
		padding-top: 1rem;
	}
}

.overview,
ngbd-default,
ngbd-page-wrapper {
	.alert {
		border-left-width: 5px;
		border-radius: 0;
	}
}

ngb-alert {
	background-color: #f5f5f5; // same as bootstrap card header
	border-radius: 3px;
	tab-size: 2;
}

// Right-To-Left layout for the Islamic Calendars
ngb-datepicker.rtl {
	direction: rtl;
}

ngb-datepicker.rtl ngb-datepicker-navigation-select select.form-select {
	background-position: left 0.25rem center;
}

ngb-datepicker.rtl .ngb-dp-arrow-next .ngb-dp-navigation-chevron {
	transform: rotate(-135deg);
	margin: 0 0 0 0.25rem;
}

ngb-datepicker.rtl .ngb-dp-arrow-prev .ngb-dp-navigation-chevron {
	transform: rotate(45deg);
	margin: 0 0.25rem 0 0;
}

ngb-datepicker.hebrew {
	.ngb-dp-day {
		width: 2.75rem;
		height: 2.75rem;
		line-height: 1rem;
	}

	.ngb-dp-weekday {
		width: 2.75rem;
	}
}

ngb-carousel {
	.carousel-item img {
		width: 100%;
	}
}
